<!--
 * @Author: sundl
 * @Date: 2021-04-08 16:13:29
 * @project: 天津YQ平台
-->
<template>
  <el-row class="wrap">
    <module-card>
      <template v-slot:header>关联专题</template>
      <common-table ref="table" :columns="relationSubjectConfig.columns" :condition="condition">
        <template v-slot:factor-info="{ row }">
          <div class="factor">
            <p>联系电话：{{ row.ryysLxdh | filterText }}</p>
            <p>车辆号：{{ row.ryysClh | filterText }}</p>
            <p>网名：{{ row.ryysWm | filterText }}</p>
          </div>
        </template>
      </common-table>
    </module-card>
  </el-row>
</template>

<script>
// import { mapGetters, mapActions } from 'vuex';
import { relationSubjectConfig } from './config';
import { findSubjectByFlowId } from '@/api/common';

export default {
  name: 'people-info-list',
  components: {},
  data() {
    return {
      condition: {},
      relationSubjectConfig,
      findSubjectByFlowId
    };
  },
  computed: {
    flowId() {
      return this.$route.params.id || '';
    }
  },
  methods: {
    fetchList() {
      this.$refs.table &&
        this.$refs.table.search(
          findSubjectByFlowId,
          {
            flowId: this.flowId,
            searchable: JSON.stringify({
              page: 0,
              size: 5,
              sort: [],
              searchCondition: {}
            })
          },
          { currentPage: 0, pageSize: 5 }
        );
    }
  },
  mounted() {
    this.$nextTick(() => {
      this.fetchList();
    });
  }
};
</script>

<style lang="scss" scoped>
.wrap {
  &-title {
    font-weight: bolder;
  }
}
.form-item {
  .label {
    text-align: right;
    min-width: 7em;
  }
}
</style>
